package net.oschina.app.com.oschina;

import net.oschina.app.SoloWrap;
import net.oschina.app.com.oschina.pages.CommonPage;
import net.oschina.app.com.oschina.pages.ExplorePage;
import net.oschina.app.com.oschina.pages.LoginDetailPage;
import net.oschina.app.com.oschina.pages.LoginPage;
import net.oschina.app.com.oschina.pages.NavigationPage;
import net.oschina.app.com.oschina.pages.SettingPage;

/**
 * Created by Administrator on 2017/1/5.
 */

public class pagehelper {

    private SoloWrap solo;
    private NavigationPage navigationPage;
    private LoginPage loginPage;
    private LoginDetailPage loginDetailPage;
    private SettingPage settingPage;
    private ExplorePage explorePage;
    private CommonPage commonPage;

    public pagehelper(SoloWrap solo){
        this.solo = solo;
    }

    public CommonPage commonPage(){
        if(commonPage == null){
            commonPage = new CommonPage(solo);
        }
        return commonPage;
    }

    public ExplorePage explorePage(){
        if(explorePage == null){
            explorePage = new ExplorePage(solo);
        }
        explorePage.initViews();
        return explorePage;
    }

    public SettingPage settingPage(){
        if(settingPage == null){
            settingPage = new SettingPage(solo);
        }
        settingPage.initViews();
        return settingPage;
    }

    public NavigationPage getNavigationPage(){
        if(navigationPage == null){
            navigationPage = new NavigationPage(solo);
        }
        navigationPage.initViews();
        return navigationPage;
    }

    public LoginPage loginPage(){
        if(loginPage == null){
            loginPage = new LoginPage(solo);
        }
        loginPage.initViews();
        return loginPage;
    }

    public LoginDetailPage loginDetailPage(){
        if(loginDetailPage == null){
            loginDetailPage = new LoginDetailPage(solo);
        }
        loginDetailPage.initViews();
        return loginDetailPage;
    }




}
